1. Technical Field
The invention is related to peer-to-peer (P2P) file sharing, and in particular, to a system and method for P2P file sharing that allows for simultaneous sharing and access of multiple folders, sub-folders, and/or files with optional on-demand file access.
2. Related Art
In general, a peer-to-peer (P2P) network is a network that relies on the computing power and bandwidth of participant peers rather than a few large servers. The basic idea of peer-to-peer (P2P) networks is to allow each peer in the network to directly share individual files, and/or to assist a server in distributing either individual files or streaming media content. As is well known to those skilled in the art, there are a large number of conventional approaches to implementing P2P networks.
For example, one conventional P2P-based file-sharing scheme uses one or more servers to maintain a centralized file list. For peers that wish to receive a particular file, the server will instruct those peers to establish direct connections with other peers known by the server to contain all or part of the file that is to be shared. As a result, the overhead that would otherwise result from the central server being required to serve the requested file to one or more of the peers is eliminated.
Other conventional P2P file sharing applications operate using the concept of a decentralized network. Unfortunately, many such schemes are unable to scale to very large numbers of peers without being overwhelmed by data requests such as the broadcast search message traffic that must be exchanged between the peers. Related conventional schemes partially address such concerns by using the concept of “supernodes” to provide for semi-centralized search and indexing. For example, when a peer first connects to the network, it attempts to contact one or more IP addresses corresponding to a list of known supernodes. As soon as it finds a working supernode, the peer requests a list of currently active supernodes to be used for further connection attempts. The peer then picks one supernode as its server and uploads a list of files it intends to share to that supernode. It also sends search requests to the supernode for files it wants to receive. The supernode then communicates with other supernodes in order to satisfy the peer search requests, and provides the results of those communications back to the peer. The peer then contacts other “matching” peers directly in order to perform the actual P2P file sharing.
Yet another related conventional P2P scheme uses servers that act as communication hubs for the peers, and allows the peers to locate files within the overall P2P network. This scheme also uses a compound hash checksum to identify files, thereby allowing an identification of identical files as well as distinction of differing files with identical filenames.
Recently, a “torrent-based” P2P file sharing protocol has been adopted by a number of conventional P2P schemes. For example, such schemes generally break a file into smaller fragments, and distribute the fragments across a plurality of peers on the P2P network. To download files using such schemes, peers first download a “torrent file,” which contains the address of a tracker node and the hashes of the file fragments. The hash is used to ensure that a malicious attacker can not corrupt the P2P content in distribution. The tracker node maintains a log of which peers are downloading the file in combination with the current progress of the download. Unfortunately, one common problem with conventional torrent-based P2P file sharing schemes is the inability to directly search for files by name within the P2P network. In general, peers must find the initial torrent file by other means, such as a web search.
Such torrent-based schemes are sometimes optimized by distributing the file fragments that are the “local rarest” to more peers. This ensures that rare fragments distributed to the peers can be redistributed to other peers, thereby more fully utilizing each peer's bandwidth resource, and making it more likely that the entire file can be shared. Another optimization of such schemes is to provide an incentive-based strategy that prioritizes uploads to connecting peers which are in turn uploading content back to the current node with the ongoing download. This “tit-for-tat” strategy addresses “leech behavior” that plagues common P2P networks where a peer attempts to download files without allowing itself to be used for uploads.
Another problem with each of the aforementioned P2P file sharing schemes is that they are geared towards sharing small numbers of large static files, such as MP3 music, movies, software distribution, etc. As a result, conventional P2P file sharing schemes are not well suited for use in applications that require more flexible file sharing, such as on-demand movie access, P2P file browsing, friend-to-friend folder sharing, or real-time media streaming.
For example, with respect to media streaming, most conventional P2P schemes are not adapted for efficiently streaming media because they do not care about the order or timing of the delivery of data packets constituting the file or files being downloaded. The files are simply broadcast in pieces from various peers to a client, and then simply locally reassembled in the correct order to reconstruct the original file on the client computer. However, in the case of streaming media, the timing and order of data packets must be carefully considered and controlled to provide for efficient streaming of that media.
The problem of media streaming in P2P networks has been partially addressed by several well known conventional schemes. For example, several conventional P2P schemes use application-level multicast (ALM) protocols for media streaming. In particular, in these ALM-based schemes, the peer nodes are self organized into an overlay tree over an existing IP network. The streaming data is then distributed along the overlay tree. The cost of providing bandwidth is then shared amongst the peer nodes, thereby reducing the bandwidth burden (and thus dollar cost) of running the media server. However, one problem with such schemes is that the leaf nodes of the distribution tree only receive the streaming media and do not contribute to content distribution.
Several related conventional schemes address some of the aforementioned content distribution limitations of generic ALM-based schemes by using multiple distribution trees that span the source and the peer nodes. Each “tree” can then transmit a separate piece of streaming media. As a result, all peer nodes can be involved in content distribution. Another related conventional P2P media streaming solution uses a “cache-and-relay” approach such that peer nodes can serve clients with previously distributed media from its cache.